<table border=1>

	<tr>
		<th>Title</th>
		<th>body</th>
		<th>author</th>
		<th>date</th>
	</tr>
 <?php foreach ($messages as $message) { ?>

    <tr>
		<td><?php echo $message->title; ?></td>
		<td><?php echo $message->body; ?></td>
		<td><?php echo $message->author; ?></td>
	    <td><?php echo $message->date; ?></td>
	
	<tr>
<?php } ?>

</table>
